package o;

import o.fyk.c;
import o.fyk.e;

class fys {
    static final /* synthetic */ boolean ॱॱ = (!fys.class.desiredAssertionStatus());
    public fzr ʻ;
    private final fzn ʻॱ = new fzn();
    private final fzp ʼ = new fzp();
    private final fzp ʼॱ = new fzp();
    public fzr ʽ;
    private final fzp ʾ = new fzp();
    public final fzp ˊ = new fzp();
    private final fzp ˊॱ = new fzp();
    public final fzp ˋ = new fzp();
    private final fzp ˋॱ = new fzp();
    public fyr ˎ;
    public c ˏ;
    private final fzp ˏॱ = new fzp();
    private final fzp ͺ = new fzp();
    public c ॱ;
    private final fzp ॱˊ = new fzp();
    private final fzp ॱˋ = new fzp();
    private final fzn ॱˎ = new fzn();
    private final fzp ॱᐝ = new fzp();
    private final fzp ᐝ = new fzp();
    private final fzp ᐝॱ = new fzp();

    fys() {
    }

    public float ˋ(e eVar, c cVar, fzr o_fzr, c cVar2, fzr o_fzr2, float f) {
        this.ˏ = cVar;
        this.ॱ = cVar2;
        int i = eVar.ˋ;
        if (ॱॱ || (i > 0 && i < 3)) {
            this.ʻ = o_fzr;
            this.ʽ = o_fzr2;
            this.ʻ.ˏ(this.ॱˎ, f);
            this.ʽ.ˏ(this.ʻॱ, f);
            if (i == 1) {
                this.ˎ = fyr.POINTS;
                this.ʼ.ॱ(this.ˏ.ˊ(eVar.ˊ[0]));
                this.ᐝ.ॱ(this.ॱ.ˊ(eVar.ˎ[0]));
                fzn.ˏ(this.ॱˎ, this.ʼ, this.ˏॱ);
                fzn.ˏ(this.ʻॱ, this.ᐝ, this.ͺ);
                this.ˋ.ॱ(this.ͺ).ˎ(this.ˏॱ);
                return this.ˋ.ॱ();
            } else if (eVar.ˊ[0] == eVar.ˊ[1]) {
                this.ˎ = fyr.FACE_B;
                this.ॱˋ.ॱ(this.ॱ.ˊ(eVar.ˎ[0]));
                this.ᐝॱ.ॱ(this.ॱ.ˊ(eVar.ˎ[1]));
                this.ॱᐝ.ॱ(this.ᐝॱ).ˎ(this.ॱˋ);
                fzp.ˏ(this.ॱᐝ, 1.0f, this.ˋ);
                this.ˋ.ॱ();
                fzi.ॱ(this.ʻॱ.ˏ, this.ˋ, this.ॱˊ);
                this.ˊ.ॱ(this.ॱˋ).ˏ(this.ᐝॱ).ˊ(0.5f);
                fzn.ˏ(this.ʻॱ, this.ˊ, this.ͺ);
                this.ʼ.ॱ(cVar.ˊ(eVar.ˊ[0]));
                fzn.ˏ(this.ॱˎ, this.ʼ, this.ˏॱ);
                this.ॱᐝ.ॱ(this.ˏॱ).ˎ(this.ͺ);
                r0 = fzp.ˎ(this.ॱᐝ, this.ॱˊ);
                if (r0 >= 0.0f) {
                    return r0;
                }
                this.ˋ.ˎ();
                return -r0;
            } else {
                this.ˎ = fyr.FACE_A;
                this.ˊॱ.ॱ(this.ˏ.ˊ(eVar.ˊ[0]));
                this.ˋॱ.ॱ(this.ˏ.ˊ(eVar.ˊ[1]));
                this.ॱᐝ.ॱ(this.ˋॱ).ˎ(this.ˊॱ);
                fzp.ˏ(this.ॱᐝ, 1.0f, this.ˋ);
                this.ˋ.ॱ();
                fzi.ॱ(this.ॱˎ.ˏ, this.ˋ, this.ॱˊ);
                this.ˊ.ॱ(this.ˊॱ).ˏ(this.ˋॱ).ˊ(0.5f);
                fzn.ˏ(this.ॱˎ, this.ˊ, this.ˏॱ);
                this.ᐝ.ॱ(this.ॱ.ˊ(eVar.ˎ[0]));
                fzn.ˏ(this.ʻॱ, this.ᐝ, this.ͺ);
                this.ॱᐝ.ॱ(this.ͺ).ˎ(this.ˏॱ);
                r0 = fzp.ˎ(this.ॱᐝ, this.ॱˊ);
                if (r0 >= 0.0f) {
                    return r0;
                }
                this.ˋ.ˎ();
                return -r0;
            }
        }
        throw new AssertionError();
    }

    public float ˎ(int[] iArr, float f) {
        this.ʻ.ˏ(this.ॱˎ, f);
        this.ʽ.ˏ(this.ʻॱ, f);
        switch (this.ˎ) {
            case POINTS:
                fzi.ˋ(this.ॱˎ.ˏ, this.ˋ, this.ʾ);
                fzi.ˋ(this.ʻॱ.ˏ, this.ˋ.ˎ(), this.ʼॱ);
                this.ˋ.ˎ();
                iArr[0] = this.ˏ.ˊ(this.ʾ);
                iArr[1] = this.ॱ.ˊ(this.ʼॱ);
                this.ʼ.ॱ(this.ˏ.ˊ(iArr[0]));
                this.ᐝ.ॱ(this.ॱ.ˊ(iArr[1]));
                fzn.ˏ(this.ॱˎ, this.ʼ, this.ˏॱ);
                fzn.ˏ(this.ʻॱ, this.ᐝ, this.ͺ);
                return fzp.ˎ(this.ͺ.ˎ(this.ˏॱ), this.ˋ);
            case FACE_A:
                fzi.ॱ(this.ॱˎ.ˏ, this.ˋ, this.ॱˊ);
                fzn.ˏ(this.ॱˎ, this.ˊ, this.ˏॱ);
                fzi.ˋ(this.ʻॱ.ˏ, this.ॱˊ.ˎ(), this.ʼॱ);
                this.ॱˊ.ˎ();
                iArr[0] = -1;
                iArr[1] = this.ॱ.ˊ(this.ʼॱ);
                this.ᐝ.ॱ(this.ॱ.ˊ(iArr[1]));
                fzn.ˏ(this.ʻॱ, this.ᐝ, this.ͺ);
                return fzp.ˎ(this.ͺ.ˎ(this.ˏॱ), this.ॱˊ);
            case FACE_B:
                fzi.ॱ(this.ʻॱ.ˏ, this.ˋ, this.ॱˊ);
                fzn.ˏ(this.ʻॱ, this.ˊ, this.ͺ);
                fzi.ˋ(this.ॱˎ.ˏ, this.ॱˊ.ˎ(), this.ʾ);
                this.ॱˊ.ˎ();
                iArr[1] = -1;
                iArr[0] = this.ˏ.ˊ(this.ʾ);
                this.ʼ.ॱ(this.ˏ.ˊ(iArr[0]));
                fzn.ˏ(this.ॱˎ, this.ʼ, this.ˏॱ);
                return fzp.ˎ(this.ˏॱ.ˎ(this.ͺ), this.ॱˊ);
            default:
                if (ॱॱ) {
                    iArr[0] = -1;
                    iArr[1] = -1;
                    return 0.0f;
                }
                throw new AssertionError();
        }
    }

    public float ॱ(int i, int i2, float f) {
        this.ʻ.ˏ(this.ॱˎ, f);
        this.ʽ.ˏ(this.ʻॱ, f);
        switch (this.ˎ) {
            case POINTS:
                this.ʼ.ॱ(this.ˏ.ˊ(i));
                this.ᐝ.ॱ(this.ॱ.ˊ(i2));
                fzn.ˏ(this.ॱˎ, this.ʼ, this.ˏॱ);
                fzn.ˏ(this.ʻॱ, this.ᐝ, this.ͺ);
                return fzp.ˎ(this.ͺ.ˎ(this.ˏॱ), this.ˋ);
            case FACE_A:
                fzi.ॱ(this.ॱˎ.ˏ, this.ˋ, this.ॱˊ);
                fzn.ˏ(this.ॱˎ, this.ˊ, this.ˏॱ);
                this.ᐝ.ॱ(this.ॱ.ˊ(i2));
                fzn.ˏ(this.ʻॱ, this.ᐝ, this.ͺ);
                return fzp.ˎ(this.ͺ.ˎ(this.ˏॱ), this.ॱˊ);
            case FACE_B:
                fzi.ॱ(this.ʻॱ.ˏ, this.ˋ, this.ॱˊ);
                fzn.ˏ(this.ʻॱ, this.ˊ, this.ͺ);
                this.ʼ.ॱ(this.ˏ.ˊ(i));
                fzn.ˏ(this.ॱˎ, this.ʼ, this.ˏॱ);
                return fzp.ˎ(this.ˏॱ.ˎ(this.ͺ), this.ॱˊ);
            default:
                if (ॱॱ) {
                    return 0.0f;
                }
                throw new AssertionError();
        }
    }
}
